import Vue from 'vue'
import VueRouter from 'vue-router'
import Miste from '../views/Miste/miste.vue'
import Order from '../views/Order/order.vue'
import Profile from '../views/Profile/profile.vue'
import Search from '../views/Search/serach.vue'
import Login from '../views/Login/Login.vue'
import Shop from '../views/Shop/Shop.vue'
import Goods from '../views/Shop/Goods/Goods.vue'
import Ratings from '../views/Shop/Rating/Rating.vue'
import Info from '../views/Shop/Info/Info'
Vue.use(VueRouter)

const routes = [
    {
        path:'/',
        redirect: '/miste'
        },
    {
        path: '/miste',
        component: Miste,
    },
    {
        path: '/shop',
        component: Shop,
        redirect:'/shop/foods',
        children:[
            { path: '/shop/foods', component:Goods},
            { path: '/shop/ratings', component: Ratings },
            { path: '/shop/info', component: Info }
        ]
    },
    
    {
        path:'/order',
        component:Order
    },
    {
        path:'/search',
        component:Search
    },
    { path: '/profile', component: Profile },
    { path: '/login', component: Login},
    
    
]

const router = new VueRouter({
  routes
})

export default router
